package com.aloda.utils;

import java.util.regex.Pattern;

public class AccountUtils {

    /**
     * 校验账号合法性
     * @param account 账号
     * @return
     */
    public static boolean checkAccount(String account) {
        // 校验账号
        Pattern accountPattern = Pattern.compile("^[A-Za-z0-9]{6,16}$");
        return account != null
                && !account.isEmpty()
                && accountPattern.matcher(account).matches();
    }
}
